package com.xiaojf.xlog;

import com.xiaojf.xlog.appender.console.AccessLogConsoleAppender;
import com.xiaojf.xlog.appender.es.configure.AccessLogEsAppenderConfigure;
import com.xiaojf.xlog.appender.file.configure.AccessLogFileAppenderConfigure;
import com.xiaojf.xlog.appender.rdb.configure.AccessLogRdbAppenderConfigure;
import com.xiaojf.xlog.configure.LogSystemConfigure;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 初始化
 *
 * @author Ade.Xiao 2021/3/10 18:21
 */
public class LogSystemSelector implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        // 需要自动加载的类
        return new String[]{
                LogSystemConfigure.class.getName(),
                AccessLogRdbAppenderConfigure.class.getName(),
                AccessLogEsAppenderConfigure.class.getName(),
                AccessLogConsoleAppender.class.getName(),
                AccessLogFileAppenderConfigure.class.getName()

        };
    }
}